package com.xhh.nphm.gaoxin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhh.nphm.common.annotation.DataSource;
import com.xhh.nphm.common.constant.Constants;
import com.xhh.nphm.gaoxin.entity.GxqTwfSendBackEty;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository

public interface GxqTelWFBackDao extends BaseMapper<GxqTwfSendBackEty> {
    @Select("select pkId,wfId,seqName,sortName,dealName,sbdeptName,sendDesc,sdeptName,convert(varchar(19),BackLimit,20) as backLimit,suserName,convert(varchar(19),SendTime,20) as sendTime,sendState as chgState,convert(varchar(19),GetTime,20) as getTime,getPerson,buserName,convert(varchar(19),BackTime,20) as backTime,PkId as myOP from tWfSendBack where WfId=#{id} and OriLevel=1 and IsDel=0  order by PkId desc")
    List<GxqTwfSendBackEty> backList(Integer id);

    @Select("select * from tWfSendBack where pkId=#{id} and OriLevel=1 and IsDel=0")
    GxqTwfSendBackEty selectBack(Integer id);
}
